//
//  CustomerViews.swift
//  GoCash
//
//  Created by jie on 2024/5/13.
//

import SwiftUI


struct NagigationBackButton: View {
    
    @Environment(\.presentationMode) var presentationMode
    
    var whiteStyle: Bool = true
    
    var action: (()->Void)?
    
    var body: some View {
        Button(action: {
            if action != nil { action?() } else { presentationMode.wrappedValue.dismiss() }
        }, label: {
            Image(systemName: "chevron.backward.circle.fill").foregroundColor(whiteStyle ? MAIN_COLOR : COLOR_EFEBF4).padding(0)
        })
    }
}



struct NagigationServiceButton: View {
    
    @Environment(\.presentationMode) var presentationMode
    
    var whiteStyle: Bool = true
    
    var action: (()->Void)?
    
    var body: some View {
        Button(action: {
            if action != nil { action?() } else {  }
        }, label: {
            Image(systemName: "headphones.circle.fill").foregroundColor(whiteStyle ? MAIN_COLOR : .gray).padding(0)
        })
    }
}
